package day03.lianxi.duotai;

public class Lian01 {
    public static void main(String[] args) {
        Animal a = new cat();
        a.eat();
    }
}
    class Animal {
        public void eat() {
            System.out.println("动物吃饭");
        }
    }

    class cat extends Animal {
        @Override
        public void eat() {
            System.out.println("猫吃鱼");
        }
    }

